package dome1;

/**
 * Created with IntelliJ IDEA.
 * Description: 自定义异常实现登录
 * User: 王圆豪
 * Date: 2024-06-02
 * Time: 17:11
 */
public class Test {
    public static void func1() {
        Login login = new Login();
        login.setName("wyh");
        login.setPassword("123");
        try {
            login.identify("wyh", "123");
        } catch (NameException e) {
            e.printStackTrace();
        } catch (PasswordException e) {
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
        func1();
    }
}
